import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Rule',
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/Rule.vue')
    }
  },
  {
    path: '/rank',
    name: 'Rank',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/Rank.vue')
    }
  }, {
    path: "/vote",
    name: "Vote",
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/Vote.vue')
    }
  }, {
    path: "/userinfo",
    name: "userinfo",
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/UserInfo.vue')
    },

  }, {
    path: "/multiplevote",
    name: "multiplevote",
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/MultipleVote.vue')
    },

  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
